// 订单模块
const {
    Order,
    getOrders,
    getAllOrders
} = require('../../../model/Order');

module.exports = async (req, res) => {
    const revs = {};
    if (req.rev_id) {
        revs = await Order.find({
            rev_id
        }).sort('-createTime');
    } else if (req.dateType && req.startDate && req.endDate) {
        revs = await Order.find({}).sort('-createTime');
    } else {
        revs = await Order.find().sort('-createTime');
    }
    // 响应
    res.send(revs);
}